package com.globallogic.vacationplanner.model.entity;

// default package
// Generated Oct 15, 2013 7:34:25 PM by Hibernate Tools 4.0.0

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "vacation", catalog = "vacation_planner")
public class Vacation implements java.io.Serializable {
	private static final long serialVersionUID = 863922034273675644L;
	private Integer idVacation;
	private User user;
	private String description;
	private String startDate;
	private String endDate;

	public Vacation() {
	}

	public Vacation(User user, String description, String startDate,
			String endDate) {
		this.user = user;
		this.description = description;
		this.startDate = startDate;
		this.endDate = endDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_vacation", unique = true, nullable = false)
	public Integer getIdVacation() {
		return this.idVacation;
	}

	public void setIdVacation(Integer idVacation) {
		this.idVacation = idVacation;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_user", nullable = false)
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "description", nullable = false, length = 145)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "start_date", nullable = false, length = 45)
	public String getStartDate() {
		return this.startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	@Column(name = "end_date", nullable = false, length = 45)
	public String getEndDate() {
		return this.endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

}
